<{include file="common/header.tpl"}>
<{include file="effect/CPS/style.tpl"}>
<section id="spread_one" class="column">
  
		<article class="module width_3_quarter">
        <header class="hd">
         
      
            <span class="menu">
            
                [
               <{if $param[1] == $day.yesterday and $param[2] == $day.yesterday}>
               <b>昨天</b>
               <{else}>
               <a href="/CPS/report/<{$param[0]}>/<{$day.yesterday}>/<{$day.yesterday}>">昨天</a>
               <{/if}>
                 | 
                 <{if $param[1] == $day.threedaysago and $param[2] == $day.yesterday}>
                 <b>三天内</b>
                 <{else}>
                 <a href="/CPS/report/<{$param[0]}>/<{$day.threedaysago}>/<{$day.yesterday}>">三天内</a>
                 <{/if}>
                 | 
                 <{if $param[1] == $day.aweekago and $param[2] == $day.yesterday}>
                 <b>一周内</b>
                 <{else}>
                 <a href="/CPS/report/<{$param[0]}>/<{$day.aweekago}>/<{$day.yesterday}>">一周内</a>
                 <{/if}>
                  | 
                  <{if $param[1] == $day.amonthago and $param[2] == $day.yesterday}>
               	  <b>一月内</b>
                  <{else}>
                  <a href="/CPS/report/<{$param[0]}>/<{$day.amonthago}>/<{$day.yesterday}>">一月内</a>
                  <{/if}>
                  ]

                &nbsp;
                <{if $report_sub_type == 'channels'}>
                <b>按渠道</b>
                <{else}>
                <a href="/CPS/report/channels<{if $report_days.start}>/<{$report_days.start}><{/if}><{if $report_days.stop}>/<{$report_days.stop}><{/if}>">按渠道</a>
                <{/if}>

                &nbsp; |
                <{if $report_sub_type == 'activities'}>
                <b>按游戏</b>
                <{else}>
                <a href="/CPS/report/activities<{if $report_days.start}>/<{$report_days.start}><{/if}><{if $report_days.stop}>/<{$report_days.stop}><{/if}>">按游戏</a>
                <{/if}>
            </span>
            <div class="">
				<span class="fw" style="font-family:'黑体'">&nbsp;</span>
				从<input type="text" value="<{$day.start_day}>" id="date1" name='start_date' />
				至<input type="text" value="<{$day.end_day}>" id="date2" name='end_date'/>
				<input type="submit" value="查询" class="effect-update" id="cps_effect">
			</div>
        </header>
          
		<div class="tab_container">
			<div id="tab1" class="tab_content">
                <{if $report_sub_type == 'detail'}>
                    <{php}>
$chn_key = $this->_tpl_vars['param'][0];
echo Request::factory("/widget/channel/$chn_key")->execute()->body();
                    <{/php}>
                <{/if}>
                <{include file="effect/CPS/report/$report_sub_type.tpl"}>
                <{include file="effect/CPS/summary.tpl"}>
			</div><!-- end of #tab1 -->
		</div><!-- end of .tab_container -->
		</article><!-- end of content manager article -->
		<div class="clear"></div>
	</section>			
	
	<script>
		$('#cps_effect').click(function() {
		var date1 = $('#date1').val().replace(/\//g,'-');
		var date2 = $('#date2').val().replace(/\//g,'-');
		window.location.href ="/CPS/report/<{$param[0]}>/"+date1 + "/" + date2 
		});
	</script>
<{include file="common/footer.tpl"}>
